package com.yc.javaee.网络爬虫;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

import java.io.IOException;
import java.net.URL;

public class Demo {

    public static void main(String[] args) throws IOException {
        URL url = new URL("http://hyfc365.com/");
        Document doc = Jsoup.parse(url, 5000);

        Elements lis = doc.select(".index_news ul>li");
        lis.forEach( element -> {
            System.out.println(element.text());
        });

    }

}
